package com.scz.dto.log;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @Description: 订单日志
 * @Author: yanruian
 * @Create: 2025-02-01 20:06
 * @Version: 1.0
 **/
@NoArgsConstructor
@Data
public class OrderLogDto {
    /**
     * orderId
     */
    @JSONField(name = "order_id")
    private String orderId;
    /**
     * products
     */
    @JSONField(name = "products")
    private List<ProductsDTO> products;
    /**
     * totalAmount
     */
    @JSONField(name = "total_amount")
    private Double totalAmount;
    /**
     * status
     */
    @JSONField(name = "status")
    private Integer status;
    /**
     * receiptName
     */
    @JSONField(name = "receipt_name")
    private String receiptName;
    /**
     * receiptAddress
     */
    @JSONField(name = "receipt_address")
    private String receiptAddress;

    /**
     * ProductsDTO
     */
    @NoArgsConstructor
    @Data
    public static class ProductsDTO {
        /**
         * productId
         */
        @JSONField(name = "product_id")
        private String productId;
        /**
         * productName
         */
        @JSONField(name = "product_name")
        private String productName;
        /**
         * quantity
         */
        @JSONField(name = "quantity")
        private Integer quantity;
        /**
         * price
         */
        @JSONField(name = "price")
        private Double price;
    }
}
